package com.crm.web.page;

import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.annotations.InjectState;
import com.javaforge.tapestry.spring.annotations.InjectSpring;
import com.crm.service.ICustomerService;
import com.crm.model.User;

import java.util.List;

/**
 * @author <a href="mailto:huang0510@hotmail.com">HuangHuang</a>
 * @version $Id$
 */
public abstract class CurrentWeek extends BasePage {

    @InjectSpring("customerService")
    public abstract ICustomerService getCustomerServ();

    @InjectState("userSession")
    public abstract User getUserSession();

    public List getEntries(){
        try{
            return getCustomerServ().getCustomerThisWeek(getUserSession());
        }
        catch(Exception e){
            e.printStackTrace();
            return null;
        }
    }

    public void searchByKeyword(){
    }
}
